
<form id="form_edit"><input type="hidden" name="id" value="{[$smarty.request.id]}" />
<input type="hidden" name="rate" id="rate" value="{[$result.rate]}" size="12">
<input type="hidden" name="rmb" id="rmb" value="{[$result.rmb]}" size="12">
<table>
	<tr>
		<td  width="20%" align="right">流水号：</td>
		<td  width="30%">#{[$result.id]}({[$result.oper_t]})</td>
		<td  width="20%" align="right">状态：</td>
		<td  width="30%">{[$result.status_t]}</td>
	</tr>
	<tr>
		<td align="right">标题：</td>
		<td><input type="text" name="name" value="{[$result.name]}" size="20"></td>
		<td align="right">日期：</td>
		<td><input type="text" name="date" id="date" value="{[$result.date]}" size="12"></td>
	</tr>
	<tr>
		<td align="right">客户：</td>
		<td colspan="3"><input type="text" name="customer" id="customer"
				value="{[$result.customer]}:{[$result.customer_t]}" size="20"
				title="{[$t.customer]}"> <a href="javascript:void(0)"
			id="customer_x" onclick="Common.toggle(this, '#label_linkman_a')(this)" class="ui-icon ui-icon-circle-triangle-w"
			style="display: inline-table"></a></td>
	</tr>
	<tr id="label_linkman_a">
		<td></td>
		<td colspan="3">{[include file="contact/customer/_linkman.tpl"]}</td>
	</tr>
	<tr>
		<td align="right">供应商：</td>
		<td colspan="3"><input type="text" name="supplier" id="supplier"
				value="{[$result.supplier]}:{[$result.supplier_t]}" size="20"
				title="{[$t.supplier]}"> <a href="javascript:void(0)" id="supplier_x"
			onclick="Common.toggle(this, '#label_linkman')" class="ui-icon ui-icon-circle-triangle-w" style="display: inline-table"></a></td>
	</tr>
	<tr id="label_linkman">
		<td></td>
		<td colspan="3">{[include file="_linkman.tpl"]}</td>
	</tr>
	<tr>
		<td align="right">负责人：</td>
		<td><input type="text" name="emp" id="emp" value="{[$result.emp]}:{[$result.emp_t]}" size="12" title="{[$t.emp_|emp:'负责人']}"></td>
		<td align="right">签订日期：</td>
		<td><input type="text" name="t1" id="t1" value="{[$result.t1|date_format:'%Y-%m-%d']}" size="12"></td>
	</tr>
	<tr>		
		<td align="right">签订地点：</td>
		<td><input type="text" name="city" value="{[$result.city]}" size="12"></td>
		<td align="right">交货日期：</td>
		<td><input type="text" name="t2" id="t2" value="{[$result.t2|date_format:'%Y-%m-%d']}" size="12"></td>
	</tr>	
	<tr>
		<td align="right">金额：</td>
		<td colspan="3"><input type="text" name="amount" id="amount" value="{[$result.amount]}" size="12"> <select name='currency'
			id='currency'>
			{[html_options options=$currency_option selected=$result.currency]}
		</select> <label id="label_amount"></label></td>
	</tr>
	
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><textarea rows="8" name="content" cols="55">{[$result.content]}</textarea></td>
	</tr>
</table>
</form>

<div style="margin-top: 10px; margin-bottom: 5px; width: 740px; float: left;">
<div id="myGrid" style="width:100%;height:160px;"></div>
</div>
<table border="0">
	<tr>
		<td width="420" align="right"></td>
		<td width="80"><div id="amount_t"></div></td>
		<td></td>
	</tr>
</table>

<script type='text/javascript'>
var a = $("#amount").val();
var b = $("#currency").find("option:selected").text();

Currency.upper(a, b, "#label_amount");

var data = {[$result.item]};
var currency_json = {[$currency]};
var currency = '{[$result.currency]}';
var exchange = {[$result.exchange]};
</script>

<script type="text/javascript" src="js/finance/contract/columns_edit.js?r={[$smarty.now]}"></script>
<script type="text/javascript" src="js/finance/contract/cc.js?r={[$smarty.now]}"></script>
<script type="text/javascript" src="js/finance/contract/add.js?r={[$smarty.now]}"></script>
